<!DOCTYPE html>
<html>
<head>
<meta charset="US-ASCII">
<title>Insert title here</title>
</head>
<body>
  <h1>G3DM Specification</h1>
  <p>This is the specification of the Graphiclicious 3D Model format.</p>

  <h2>Structure</h2>
  <p>The structure of the G3DM format looks as following.</p>
  <ol>
    <li>Number of materials [int]</li>
    <li>For every material: <a href="#Materials">Material</a>
    <li>Number of meshes [int]</li>
    <li>For every mesh: <a href="#Meshes">Mesh</a></li>
    <li>Root node: The root node which contains all the other nodes. See <a
      href="#Nodes">Nodes</a>.
    </li>
  </ol>

  <h2 id="Materials">Materials</h2>
  <p>Every material has this structure:</p>
  <ol>
    <li>Ambient Color [4x float]</li>
    <li>Diffuse Color [4x float]</li>
  </ol>

  <h2 id="Meshes">Meshes</h2>
  <p>Every mesh has this structure:</p>
  <ol>
    <li>Number of triangles [int]</li>
    <li>For every triangle:
      <ol>
        <li>Vertex 1 [3x float]</li>
        <li>Vertex 2 [3x float]</li>
        <li>Vertex 3 [3x float]</li>
      </ol>
    </li>
  </ol>


  <h2 id="Nodes">Nodes</h2>
  <p>Every Node contains its children. So this is a recursive structure.</p>
  <ol>
    <li>Number of meshes [int]</li>
    <li>For every mesh:
      <ol>
        <li>Mesh id [int]: Refers to a mesh in the above mesh list.</li>
      </ol>
    </li>
    <li>Number of children [int]</li>
    <li>For every child: Recursive
  </ol>
</body>
</html>